package xzlr21308;

import java.util.Scanner;

public class PhoneStore {
    public static void main(String[] args) {
        Phone p=new Phone();
        showTotal(p);
    }
    public static  void showTotal(Phone p) {
        Scanner sc = new Scanner(System.in);
        for (int i=0; i< 10000; i++) {
            System.out.println("请输入商品数量，输入0退出");
            p.setStorage(sc.nextInt());
            int b=p.getStorage();
            if (b==0) {
                break;
            } else {
                System.out.println("请输入手机品牌");
                p.setName(sc.next());
                System.out.println("请输入手机尺寸");
                p.setSize(sc.nextDouble());
                System.out.println("请输入手机价格");
                p.setPrice(sc.nextInt());
                System.out.println("请输入手机配置");
                p.setConfiguration(sc.next());
                System.out.println("----------入库清单----------");
                System.out.println("品牌：" + p.getName() + ",配置：" + p.getConfiguration() + ",尺寸：" + p.getSize() + ",价格：" + p.getPrice());
                System.out.println("总价值：" + p.getPrice() * p.getStorage());
                System.out.println("---------------------------");
            }
        }
    }
}
